package uvt.main;

import java.awt.EventQueue; 

import javax.swing.UIManager;

import uvt.database.CreateOperations;
import uvt.database.Database;
import uvt.gui.mainframe.MainFrame;

/**
 * 
 * @author Muntean Darius & Oarga Cosmin
 *
 */

public class Main {
	
	public static void main(String[] args) {
		try {
			CreateOperations db = (CreateOperations)Database.getInstace();
			db.createTableStreet();
			db.createTableStation();
			db.createTableVehicle();
			db.createTableStreetName();
			db.createTableStreetSegment();	
			db.createTableRoad();
			db.createTableRouteName();
			db.createTableRoute();
		} catch(Exception ex) {
			ex.printStackTrace();
		}
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
			EventQueue.invokeLater(new Runnable() {
				public void run() {
					new MainFrame("Timisoara Network Map");
				}
			});
			System.out.println("Merge!");	
		} catch(Exception ex) {
			ex.printStackTrace();
		}
	}
}